package com.haiwei.poi.word.loop;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.poi.xwpf.usermodel.XWPFTable;

import java.util.ArrayList;
import java.util.List;

/**
 * 需要循环的行组.
 *
 * @date: 2022-06-27
 * @version: 1.0
 * @author: karry@haiwei.com
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class HaiweiRowGroupLoop  extends  HaiweiRowGroupAbstract{
    
    // 循环标签，里边有很多参数呢
    private HaiweiLoopSign loopSign;
    
    // 包含多个行组  组成的
    private List<HaiweiRowGroup> rows = new ArrayList<>();
    
    public HaiweiRowGroupLoop(XWPFTable table,int startIndex,HaiweiLoopSign loopSign){
       setTable(table);
       setStartIndex(startIndex);
       this.loopSign = loopSign;
    }
    
    @Override
    public void addRowGroup(HaiweiRowGroup rowGroup){
        rows.add(rowGroup);
    }

}
